<div class="bg_greenyellow round_10 quarter shadow_in_0">
    <ul class="rightmenu">
        <li><a href="<?php echo $this->url(array('controller' => 'mymca', 'action' => 'auctions'), null, true) ?>" >Powrót</a></li>
    </ul>      
</div>    

<div class="threequarter vpad_10 last fixed">
    <h5 class ="round_5 shadow_out_4 bg_mediumblue">Podsumowanie</h5>
    
    <table class="datalist" width="50%">
        <tr>
        <td>Tytuł</td>
        <td><?php echo $this->auctionNamespace->title?></td>
        </tr>
        <tr>
        <td>Widoczność ofert</td>
        <td><?php if($this->auctionNamespace->hiddenOffers = 0) echo 'Tylko oferta zakładającego aukcję';
                    else echo 'Wszystkie oferty';
            ?></td>
        </tr>
        <tr>
        <td>Czas trwania aukcji</td>
        <td><?php echo $this->auctionNamespace->days?></td>
        </tr>
        <tr>
        <td>Koniec</td>
        <td><?php echo $this->dateToString($this->auctionNamespace->date)?></td>
        </tr>
        <tr>
        <td>Min. pakietów</td>
        <td><?php echo $this->auctionNamespace->minVolume?></td>
        </tr>
        <tr>
        <td>Max. pakietów</td>
        <td><?php echo $this->auctionNamespace->maxVolume?></td>
        </tr>
        <tr>
        <td>Cena za pakiet</td>
        <td><?php echo $this->auctionNamespace->offeredPrice.' zł'?></td>
        </tr>
        
        
        
    </table>
    <br />
    <h6 class ="round_5 shadow_out_4 bg_mediumblue">Towary</h6>
        <table class="datalist" width="100%">
           <caption>
               Towary
           </caption>
           <thead>
              <tr>
                 <th>#</th>
                 <th scope="col">Kupno/Sprzedaż</th>
                 <th scope="col">Nazwa</th>
                 <th scope="col">Udział</th>

              </tr>
           </thead>
           <tfoot>
              <tr>
                 <th>&nbsp;</th>
                 <th>&nbsp;</th>
                 <th>&nbsp;</th>
                 <td>&nbsp;</td>
              </tr>
           </tfoot>
           <tbody>
               <?php foreach ($this->auctionNamespace->commodities as $id) { ?>



              <tr>
                 <th scope="row"><?php echo $id; ?></th>
                 <td><?php 
                 if($this->auctionNamespace->shareFactor[$id] == -1){
                     echo 'Sprzedaż';
                 } elseif ($this->auctionNamespace->shareFactor[$id] == 1) {
                     echo 'Kupno';
                 }; ?>
                 </td>
                 <td><?php 
                 $mapper=new Application_Model_CommodityMapper();
                 $commodity = $mapper->find($id);
                 echo $commodity->getName(); ?>
                 </td>
                 <td><?php echo $this->auctionNamespace->quantity[$id]; ?></td>
              </tr> 
              <?php } ?>

           </tbody>
        </table>
    
    <h6 class ="round_5 shadow_out_4 bg_mediumblue">Opis</h6>
        
    <p class="dbox2"> <?php echo $this->auctionNamespace->description?></p>
    
    <?php echo $this->form; ?>
        
        
</div>